import java.util.Scanner;

public class demo2 {
    public static void main(String[] args) {
        //1 键盘录入一个字符串
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入字符串");
        String str = sc.next();
        //2 进行字符串的遍历
        for (int i = 0; i < str.length(); i++) {
            //遍历数组的每一个索引
            char c = str.charAt(i);
            System.out.print(c + " ");
        }
    }
}
